package com.ejuornal.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertyMgr extends Properties{

	private static PropertyMgr instance;
	
	public static PropertyMgr getInstance(String path) {
		if(instance == null) {
			instance = new PropertyMgr(path);
		} 
		return instance;
	}
	
	private PropertyMgr(String path) {
		InputStream is=getClass().getResourceAsStream(path);

		try {
			load(is);
		} catch (IOException e) {
			System.out.println("找不到配置文件");
			e.printStackTrace();
		}
	}
}
